


extension MapExtension on Map {
  String toQueryString() {
    return entries
        .where((e) => e.value != null) // 过滤空值
        .map((e) => '${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value!)}')
        .join('&');
  }
}